#ifndef QLINEWIDGET_H
#define QLINEWIDGET_H

#include "../widgets/qwidgethost.h"

#include <QWidget>

class QLineWidget : public QWidget
{
    Q_OBJECT
    Q_PROPERTY(int line_width READ lineWidth WRITE setLineWidth)
public:
    explicit QLineWidget(QWidget *parent = 0);
    
    int     lineWidth();
    void    setLineWidth(int lineWidth);
protected:
    void    paintEvent(QPaintEvent *);
signals:
    
public slots:
protected:
    int     m_line_width;
};

enum enLineDirection
{
    LD_Left_Right,
    LD_Top_Bottom,
    LD_LeftTop_RightBottom,
    LD_LeftBottom_RightTop
};

class QLineWidgetHost : public QWidgetHost
{
    Q_OBJECT
public:
    Q_INVOKABLE QLineWidgetHost(QAbstractHost *parent = 0);

    static QString get_show_name();
    static QString get_show_icon();
    static QString get_show_group();

public slots:
    int     direction();
    void    setDirection(int direction);

    int     lineWidth();
    void    setLineWidth(int lineWidth);

    int     lineStyle();
    void    setLineStyle(int lineStyle);
protected:
    void    init_property();
protected:
    void    create_object();
};


#endif // QLINEWIDGET_H
